package br.ufc.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuItem;

@SuppressWarnings("serial")
public class FileMenu extends JMenu{
	JMenuItem exitMenuItem = new JMenuItem("Exit");
//	JMenuItem openMenuItem = new JMenuItem("Open");
//	JMenuItem saveMenuItem = new JMenuItem("Save");
	
	public FileMenu(String label) {
		super(label);
		configEMenuItem();
		add(exitMenuItem);
	}
	
	private void configEMenuItem() {
		exitMenuItem.setToolTipText("Exit Application");
		exitMenuItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				System.exit(0);
			}
		});
	}
}
